#include <ctype.h>
#include <stdio.h>
int compare(char* s, char* t) {
  int i = 0;
  for (int i = 0; s[i] && t[i]; i++) {
    if (tolower(s[i]) < tolower(t[i])) return -1;
    if (tolower(s[i]) > tolower(t[i])) return 1;
  }
  return 0;
}
int main() {
  char s[101], t[101];
  scanf("%s%s", s, t);
  printf("%d\n", compare(s, t));
  return 0;
}